<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="../common/baseCss.jsp" %>
<title>更新级别 - 管理员管理</title>
</head>
<body>
	<article class="page-container">
		<form action="" method="post" class="form form-horizontal" id="gradeEditForm">
			<input type="hidden" id="gid" name="gradeId" value="${grade.gid}">
			<input type="hidden" id="oriTitle" value="${grade.gname}">
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">
					<span class="c-red">*</span>级别名称：
				</label>
				<div class="formControls col-xs-8 col-sm-9">
					<input type="text" class="input-text inputBlock" value="${grade.gname}" id="gname" name="gname">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">级别分类：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<select class='inputBlock'>
						<option name="pid" value="0">请选择级别分类</option>
						<c:forEach items="${pGrades}" var="pGrade">
						    <c:if test="${grade.pid == pGrade.gid}">
						    	<option class="select" style="width:200px" name="pid" value="${pGrade.gid}" selected="selected">${pGrade.gname}</option>
						    </c:if>
						    <c:if test="${grade.pid != pGrade.gid}">
						    	<c:if test="${grade.gid != pGrade.gid}">
						    		<option class="select" style="width:200px" name="pid" value="${pGrade.gid}">${pGrade.gname}</option>
						    	</c:if>
						    </c:if>
						</c:forEach>
					</select>
				</div>
			</div>
		
			<div class="row cl">
				<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
					<button type="submit" class="btn subbmitBtn radius">
						<i class="icon-ok"></i> 确定
					</button>
				</div>
			</div>
		</form>
	</article>

	<%@ include file="../common/baseJs.jsp" %>
	<script type="text/javascript" src="manager/js/grade/grade_edit.js"></script>
</body>
</html>